package com.zyk.plugin;

import com.zyk.filter.FilterRule;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class PluginConfig {
    /**
     * key: section
     * value: filter rules
     */
    private final Map<String, List<FilterRule>> data;

    public PluginConfig(Map<String, List<FilterRule>> data) {
        this.data = data;
    }

    public List<FilterRule> getBySection(String section) {
        return data.getOrDefault(section.toLowerCase(), new ArrayList<>());
    }

}